#!/bin/bash

# 一键更新本地所有分支
# 获取所有本地分支
branches=$(git branch --format='%(refname:short)')

for branch in $branches; do
  echo "切换到分支 $branch"
  git checkout $branch
  echo "更新 $branch"
  git pull
done

git checkout develop
echo "所有分支已更新完成，已切换到dev分支"

# 防止窗口自动关闭
read -p "按任意键继续..."